<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>animation-fill-mode</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    body {
      width: 100vw;
      height: 100vh;
      background: #2c3e50;
      display: grid;
    }
    
    ul {
     list-style: none;
     width: 400px;
     height: 100px;
     justify-self: center;
     align-self: center;
     display: grid;
     grid-template: 1fr/repeat(4, 1fr);
    }
    li {
      width: 100px;
      height: 100px;
      border-radius: 50%;
      background: #e67e22;
      color: #fff;
      display: grid;
      justify-items: center;
      align-items: center;
      animation-name: move;
      animation-duration: 2s;
      animation-delay: 2s;
    }
    li:nth-child(1) {
      animation: move 2s 2s;
    }
    /* animation: move forwards 2s 2s ; */
    li:nth-child(2) {
      animation-fill-mode: backwards; /* 延迟前就是 第一帧状态 */
    }
    li:nth-child(3) {
      animation-fill-mode: forwards; /* 结束时是最后一帧状态 */
    }
    li:nth-child(4) {
      animation-fill-mode: both; /* forwards & backwards */
    }
    @keyframes move {
      from {
        transform: scale(0);
      }
      to {
        transform: scale(1);
        background: #2ecc71;
      }
    }
  </style>
</head>
<body>
  <ul>
    <li>normal</li>
    <li>backwards</li>
    <li>forwards</li>
    <li>both</li>
  </ul>
</body>
</html>